package com.bw.business.controller;

import com.bw.business.service.BusinessService;
import com.bw.common.core.domain.Result;
import com.bw.domain.SkuInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/business")
public class BusinessController {
    @Autowired
    private BusinessService businessService;
    @PostMapping("/publish")
    public Result publish(@RequestBody SkuInfo skuInfo) {
        businessService.publish(skuInfo);
        return Result.success();
    }

}
